﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'proc_cm_ListDailyWordQuestion')
BEGIN
    PRINT 'Dropping Procedure proc_cm_ListDailyWordQuestion'
    DROP  Procedure  proc_cm_ListDailyWordQuestion
END
GO

PRINT 'Creating Procedure proc_cm_ListDailyWordQuestion'
GO

CREATE PROCEDURE [dbo].[proc_cm_ListDailyWordQuestion]
	@pDailyWordId uniqueidentifier
AS
BEGIN
	SET NOCOUNT ON

	SELECT 
		[dailyword_question_id]
		,[dailyword_id]
		,[question_num]
		,[question_txt]
		,[answer_type_cd]
		,[answer_txt]
	FROM 
		[dbo].[tbl_dailyword_question] (NOLOCK)
	WHERE
		[dailyword_id] = @pDailyWordId
	ORDER BY
		[question_num] ASC
END
GO

GRANT EXEC ON dbo.proc_cm_ListDailyWordQuestion TO PUBLIC
GO
